<?php
// +----------------------------------------------------------------------
// | Author: wyd 2025/11/2
// | DESC: 
// +----------------------------------------------------------------------

declare (strict_types=1);
namespace Study\swoole\pool;
use Swoole\Runtime;


class Pdopool extends DbPool{

    public function __construct($min = 5, $max = 10)
    {
        parent::__construct($min, $max);
        Runtime::enableCoroutine();
    }

    /**
     * @return mixed
     */
    public function newDb()
    {
        $dsn =  'mysql:host=192.168.30.201;dbname=test';
        return new \PDO($dsn,'wyd','123456');
    }
}

